<!DOCTYPE html>
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<meta name="Description" content="Cynthia项目缺陷管理系统，拥有表单流程化设计，可视化拖动布局等功能，提供项目管理，缺陷管理，，统计，查询等服务，是您项目上的好帮手！">
<meta name="Keywords" content="Cynthia,BUG管理,项目管理 ,缺陷管理,任务管理,BUG,缺陷,开源">
<title>Cynthia 欢迎您!</title>
<link href="../lib/bootstrap2/css/bootstrap.min.css" rel="stylesheet" type="text/css">
<link href="../lib/bootstrap2/css/bootstrap-responsive.min.css" rel="stylesheet" type="text/css">
<link href="../lib/g_bootstrap/css/google-bootstrap.css" rel="stylesheet" type="text/css">
<link href="../css/admin.css" rel="stylesheet" type="text/css">
<link href="../lib/select2/select2.css" rel="stylesheet" type="text/css">
<script type="text/javascript" src='../lib/jquery/jquery-1.9.3.min.js'></script>
<script type="text/javascript" src='../lib/bootstrap2/js/bootstrap.cynthia.min.js'></script>
<script type="text/javascript" src="../js/util.js"></script>
<script type="text/javascript" src='../lib/select2/select2.js'></script>
<script type="text/javascript" src="../js/admin/admin_role_user.js"></script>
</head>
<body>
<div class="container-fluid">
	<div class="control-group">
		    <label class="control-label" for="select_template">
		   	    <select id="select_template" onchange="initFlowRoles()" style="width:15em">
		   	    </select>
		   	<a href='../guide.html?guideId=role_user' style='color:#FFF' target='blank'>
				<img alt="查看帮助" title= "查看帮助" src="../images/help.png">
	  		</a>
		    </label>
		    
		    <div class="row-fluid" id="role_div" style="display:none;">
				<div class="span12 template_toolbar">
					<button class="btn btn-danger btn-create project_involved_false" data-toggle="modal" data-target='#addRoleDiv'>新建角色</button>
				</div>
				
				<table class="table table-hover table-striped table-condensed" id="roleListGrid">
					<thead>
			    		<tr>
			    			<th>序号</th><th>角色名称</th><th>删除</th><th>管理</th>
			    		</tr>
			    	</thead>
			    	<tbody>
			    	</tbody>
				</table>
			</div>
	
	</div>
</div>

<!-- 编辑div -->
<div id="modifyUserDiv" class="modal hide fade" tabindex="-1" role="dialog" aria-labelledby="tag modal" aria-hidden="true">
  <div class="modal-header">
    <button type="button" class="close" data-dismiss="modal" aria-hidden="true">×</button>
    <h5 id="myModalLabel">编辑角色用户</h5>
  </div>
  <div class="modal-body">
    <button class="btn btn-danger" data-toggle="modal" data-target='#addUserDiv'>添加用户</button>
    <div class="divider"></div>
  	<table class="table table-hover table-striped table-condensed">
    	<thead>
    		<tr><th>序号</th><th>用户名</th><th>具备角色</th></tr>
    	</thead>
    	<tbody id="user-cfg-table">
    	
    	</tbody>
    </table>
    <input type="hidden" id="role_id"/>
  </div>
  <div class="modal-footer">
    <button class="btn" data-dismiss="modal" aria-hidden="true">关闭</button>
    <button class="btn btn-primary" onclick="modifyRoleUser()">保存</button>
  </div>
</div>

<!-- 新建角色 -->
<div id="addRoleDiv" class="modal hide fade" tabindex="-1" role="dialog" aria-labelledby="tag modal" aria-hidden="true">
  <div class="modal-header">
    <button type="button" class="close" data-dismiss="modal" aria-hidden="true">×</button>
    <h5>新建角色</h5>
  </div>
  <div class="modal-body">
  	<form class="form-horizontal">
  		<div class="control-group">
		    <label class="control-label" for="role_name">角色名称：</label>
		    <div class="controls">
		   	    <input type="text" id="role_name" />
		    </div>
		</div>
  	</form>
  </div>
  <div class="modal-footer">
    <button class="btn" data-dismiss="modal" aria-hidden="true">关闭</button>
    <button class="btn btn-primary" onclick="addRole()">添加</button>
  </div>
</div>

<!--修改角色名字 -->
<div id="modifyRoleDiv" class="modal hide fade" tabindex="-1" role="dialog" aria-labelledby="tag modal" aria-hidden="true">
  <div class="modal-header">
    <button type="button" class="close" data-dismiss="modal" aria-hidden="true">×</button>
    <h5>修改角色名字</h5>
  </div>
  <div class="modal-body">
  	<form class="form-horizontal">
  		<div class="control-group">
		    <label class="control-label" for="modify_role_name">角色名称:</label>
		    <div class="controls">
		   	    <input type="text" id="modify_role_name" />
		    </div>
		</div>
  	</form>
  </div>
  <div class="modal-footer">
    <button class="btn" data-dismiss="modal" aria-hidden="true">关闭</button>
    <button class="btn btn-primary" onclick="modifyUserRole()">确定</button>
  </div>
  <input type="hidden" id = "modify_role_id" />
</div>

<!-- 新建用户 -->
<div id="addUserDiv" class="modal hide fade" tabindex="-1" role="dialog" aria-labelledby="tag modal" aria-hidden="true">
  <div class="modal-header">
    <button type="button" class="close" data-dismiss="modal" aria-hidden="true">×</button>
    <h5>添加用户</h5>
  </div>
  <div class="modal-body">
  	<form class="form-horizontal">
  		<div class="control-group">
		    <label class="control-label" for="user_email">选择用户：</label>
		    <div class="controls" id="allUserDiv">
		   	    <select id ="allUser" placeholder="多选添加用户" style="width:250px;" multiple >
		   	    </select>
		    </div>
		</div>
  	</form>
  </div>
  <div class="modal-footer">
    <button class="btn" data-dismiss="modal" aria-hidden="true">关闭</button>
    <button class="btn btn-primary" onclick="addUserRight()">添加</button>
  </div>
</div>
</body>
</html>